from django.contrib import admin
from pyplog.artists.models import Artist, Profession

class ArtistAdmin(admin.ModelAdmin):
	fieldsets = (
		(None, {
			"fields" : ("first_name", "last_name", "profession", "slug", "included_in_index")
		}),
		("Contact", {
			"classes" : ("collapse",),
			"fields" : ("website", "email"),
		}),
		("Bio", {
			"classes" : ("collapse",),
			"fields" : ("bio", "bio_markup"),
		}),
		("Photo", {
			"classes" : ("collapse",),
			"fields" : ("portrait_source_image",),
		}),
	)
	list_display = ("first_name", "last_name", "profession")
	list_filter = ("included_in_index",)
	prepopulated_fields = { "slug": ("first_name", "last_name") }
	radio_fields = { "profession" : admin.HORIZONTAL }
admin.site.register(Artist, ArtistAdmin)

class ProfessionAdmin(admin.ModelAdmin):
	pass
admin.site.register(Profession, ProfessionAdmin)